
<div class="form">

<?php
Yii::import('application.widgets.jqClEditor');


$opts = array(
	'width'=>500, // width not including margins, borders or padding
    'height'=>250, // height not including margins, borders or padding
    'controls'=>     // controls to add to the toolbar
            "bold italic underline strikethrough subscript superscript | font size " .
            "style | color highlight removeformat | bullets numbering | outdent " .
            "indent | alignleft center alignright justify | undo redo | " .
            "rule image link unlink | cut copy paste pastetext | print source",
   'colors'=>       // colors in the color popup
             "FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " .
             "CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " .
             "BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " .
             "999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " .
             "666 900 C60 C93 990 090 399 33F 60C 939 " .
             "333 600 930 963 660 060 366 009 339 636 " .
             "000 300 630 633 330 030 033 006 309 303",
    'fonts'=>        // font names in the font popup
            "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," .
            "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
    'sizes'=>        // sizes in the font size popup
            "1,2,3,4,5,6,7",
    'styles'=>       // styles in the style popup
            array(array("Paragraph", "<p>"), array("Header 1", "<h1>"), array("Header 2", "<h2>"),
             array("Header 3", "<h3>"),  array("Header 4","<h4>"),  array("Header 5","<h5>"),
             array("Header 6","<h6>")),
     'useCSS'=>      false, // use CSS to style HTML when possible (not supported in ie)
     'docType'=>      // Document type contained within the editor
             '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
     'docCSSFile'=>   // CSS file used to style the document contained within the editor
             "",
     'bodyStyle'=>    // style to assign to document body contained within the editor
             "margin:4px; font:10pt Arial,Verdana; cursor:text"
);


jqClEditor::clEditor('#test',$opts);


$editor = new jqClEditor();

$editor->addClEditor('#test2', $opts);



$editor->addClEditor('#test3', $opts);
$editor->addClEditor('#test4', $opts)

?>

<?php
$this->pageTitle=Yii::app()->name . ' - 新建项目';
?>
<div id="partner">
	<div class="dashboard" id="dashboard">
		<ul>
		<li><a href="<?php echo $this->createUrl('index'); ?>">项目列表</a><span></span></li>
		<li><a href="<?php echo $this->createUrl('admin'); ?>">项目管理</a><span></span></li>
		<li class="current"><a href="<?php echo $this->createUrl('create'); ?>">新建项目</a><span></span></li>
		</ul>
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box" >
            <div class="box-top"></div>
            <div class="box-content" >
                <div class="head"><h2>新建项目</h2></div>
                <div class="sect">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'team-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">注：带 <span class="required">*</span> 的是必填项.</p>
	<?php echo $form->errorSummary($model); ?>



	<div class="field">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'partner_id'); ?>
		<?php echo $form->dropDownList($model,'partner_id',Partner::partnername()); ?>
		<?php echo $form->error($model,'partner_id'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'mobile'); ?>
		<?php echo $form->textField($model,'mobile',array('size'=>16,'maxlength'=>16)); ?>
		<?php echo $form->error($model,'mobile'); ?>
	</div>

	<div class="field">

		<?php echo $form->labelEx($model,'summary'); ?>
		<div style="float:left;"><?php echo $form->textArea($model,'summary',array('rows'=>6, 'cols'=>50,'id'=>"test")); ?></div>
		<?php echo $form->error($model,'summary'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'city_id'); ?>
		<?php echo $form->dropDownList($model,'city_id',Category::cityname()); ?>
		<?php echo $form->error($model,'city_id'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'product'); ?>
		<?php echo $form->textField($model,'product',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'product'); ?>
	</div>

	<div class="field">

		<?php echo $form->labelEx($model,'image'); ?>
		<?php echo CHtml::activeFileField($model, 'image'); ?>
		<?php echo $form->error($model,'image'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'detail'); ?>
		<div style="float:left;"><?php echo $form->textArea($model,'detail',array('rows'=>6, 'cols'=>50,'id'=>"test2")); ?></div>
		<?php echo $form->error($model,'detail'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'notice'); ?>
		<div style="float:left;"><?php echo $form->textArea($model,'notice',array('rows'=>6, 'cols'=>50,'id'=>"test3")); ?></div>
		<?php echo $form->error($model,'notice'); ?>
	</div>


	<div class="field">
		<?php echo $form->labelEx($model,'end_time'); ?>
		<?php echo $form->textField($model,'end_time',array('size'=>16,'maxlength'=>16,'value'=>date('Y-m-d-G-i',time()+86400)));echo "年-月-日-时-分"; ?>
		<?php echo $form->error($model,'end_time'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'expire_time'); ?>
		<?php echo $form->textField($model,'expire_time',array('size'=>16,'maxlength'=>16,'value'=>date('Y-m-d',time())));echo "年-月-日"; ?>
		<?php echo $form->error($model,'expire_time'); ?>
	</div>


	<div class="field">
		<?php echo $form->labelEx($model,'team_price'); ?>
		<?php echo $form->textField($model,'team_price'); ?>
		<?php echo $form->error($model,'team_price'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'market_price'); ?>
		<?php echo $form->textField($model,'market_price'); ?>
		<?php echo $form->error($model,'market_price'); ?>
	</div>



	<div class="field">
		<?php echo $form->labelEx($model,'per_number'); ?>
		<?php echo $form->textField($model,'per_number',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'per_number'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'min_number'); ?>
		<?php echo $form->textField($model,'min_number',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'min_number'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'max_number'); ?>
		<?php echo $form->textField($model,'max_number',array('size'=>10,'maxlength'=>10)) ; ?>
		<?php echo $form->error($model,'max_number'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'address'); ?>
		<?php echo $form->textField($model,'address',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'address'); ?>
	</div>



	<div class="field">
		<?php echo $form->labelEx($model,'delivery'); ?>
		<?php echo $form->dropDownList($model,'delivery',array('coupon'=>'优惠券','express'=>'快递')); ?>
		<?php echo $form->error($model,'delivery'); ?>
	</div>

	<div class="field">
		<?php echo $form->labelEx($model,'fare'); ?>
		<?php echo $form->textField($model,'fare',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'fare'); ?>
	</div>







	<div class="field">
		<?php echo $form->labelEx($model,'express'); ?>
		<div style="float:left;"><?php echo $form->textArea($model,'express',array('rows'=>6, 'cols'=>50,'id'=>"test4")); ?></div>
		<?php echo $form->error($model,'express'); ?>
	</div>





	<div class="act">
		<?php echo CHtml::submitButton('创建',array('id'=>"signup-submit",'class'=>"formbutton")); ?>
	</div>

<?php $this->endWidget(); ?>
					</div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>
</div>